Ubuntu 10.04
Sponsored Link

Enable proxy_http
2010/07/24
  Foward requests to another web server by mod_proxy. This means configuring Web server as a revers proxy.

(1) www05.srv.world
[10.0.0.55]
- Web Server #1

(2) ubuntu.srv.world
[10.0.0.50]
- Web Server #2


This example set servers that requests to Web server (1) forward to under /test on webserver (2)

[1] Enable proxy_http
root@www05:~#
a2enmod proxy proxy_http

Enabling module proxy.
Considering dependency proxy for proxy_http:
Module proxy already enabled
Enabling module proxy_http.
Run '/etc/init.d/apache2 restart' to activate new configuration!
root@www05:~#
vi /etc/apache2/mods-enabled/proxy.conf


# line 10: make it comment

#
Deny from all
[2] Configure for forwarding
root@www05:~#
vi /etc/apache2/sites-available/default


# add these lines

<Location /proxy>

ProxyPass http://ubuntu.srv.world/test

ProxyPassReverse http://ubuntu.srv.world/test

</Location>

</VirtualHost>

root@www05:~#
/etc/init.d/apache2 restart

  * Restarting web server apache2
  ... waiting ...done.
[3] Access to /proxy. Web server (2) replys as a following screen.
 
 
Tweet